From 56edbbadb66ab24cde4b77cae52e5365ad29b274 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Thu, 26 Apr 2001 12:37:03 +0000 Subject: [PATCH] (save_excursion_restore): Don't use XBUFFER on a non-buffer. --- src/editfns.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/editfns.c b/src/editfns.c index 2c443ca5d24..e50ef45ec0a 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -848,8 +848,11 @@ save_excursion_restore (info) tem = XCDR (info); if (visible_p && !EQ (tem, selected_window) - /* This also verifies that the window is still live. */ - && XBUFFER (XWINDOW (tem)->buffer) == current_buffer) + && (tem1 = XWINDOW (tem)->buffer, + (/* Window is live... */ + BUFFERP (tem1) + /* ...and it shows the current buffer. */ + && XBUFFER (tem1) == current_buffer))) Fset_window_point (tem, make_number (PT)); UNGCPRO; -- 2.30.2